<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title></title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="../static/shopPrivate/layui/css/layui.css" media="all">
	<link rel="stylesheet" href="../static/shopPrivate//css/thesame.css" media="all">
	<link rel="stylesheet" href="../static/shopPrivate//css/footer.css" media="all">
	<link rel="stylesheet" href="../static/shopPrivate/shopManage/css/page.css" media="all">
	<link rel="stylesheet" href="../static/shopPrivate/shopManage/css/rightCon.css" media="all">
	<link rel="stylesheet" href="../static/shopPrivate/shopManage/css/popCss.css" media="all">
<!-- 	<style type="text/css">
		.rectify-img{ position: absolute; right: 40px; top: -1px; }
		.rectify-img p{ margin-left: 16px; width: 42px; position: relative; font-size: 12px; }
		.rectify-img span{ position: absolute; top: 7px; left: 0; right: 0; text-align: center; }
	</style> -->
</head>

<body class="layui-layout-body">
	<div class="layui-body layui-body-pb60px">
		<input type="hidden" id="shopId" th:value="${shop.id}">
		<div class="scroll-box">
			<div class="scroll-box-con">
				<div class="crumbs-nav f14px pb16px">
					<span>商铺 </span>
					<span class="current">查看详情</span>
				</div>
				<div class="border-radius4 bgWhite pad16px">
					<div class="f18px pb16px border-bot1px">查看商铺</div>
					<article>
						<div class="title-border fb mt16px mb16px overflow">
							<p class="left">基本信息</p>
							<p th:if="${shop.state}==8" class="right">
								<span>操作人:<em th:text="${shop.closeUserName}"></em></span>
								<span class="ml16px">关闭时间：<em th:text="${shop.closeTimeForPage}"></em></span>
							</p>
						</div>
						<div class="form-style form-box border1px pad16px relative">
							<div  class="rectify-img display-flex white">
								 <p th:if="${shop.state}==1">
								 	<img src="../static/shopPrivate/shopManage/img/icon_jy.png">
								 	<span th:text="${shop.businessType}"></span>
								</p>
                                <!--<p>
                                	<img src="../static/shopPrivate/shopManage/img/icon_zgz.png">
                                	<span>整改</span>
                                </p> -->

                                <p th:if="${shop.state}==8">
                                	<img src="../static/shopPrivate/shopManage/img/icon_gb.png">
                                	<span>关闭</span>
                                </p>


								<!-- <span>
									<img src="../static/shopPrivate/shopManage/img/icon_zgz.png">
								</span>
								<span>
									<img src="../static/shopPrivate/shopManage/img/icon_jy.png">
								</span> -->
							</div>
							<ul>
								<li class="form-title">
									<label>商铺名称：</label>
								</li>
								<li class="form-content">
									<p th:text="${shop.shopName}"></p>
								</li>
							</ul>
							<ul>
								<li class="form-title">
									<label>经营业态：</label>
								</li>
								<li class="form-content">
									<p th:text="${shop.businessType}"> </p>
								</li>
							</ul>
							<ul>
								<li class="form-title">
									<label>门牌地址：</label>
								</li>
								<li class="form-content">
									<p th:text="${shop.address}"> </p>
								</li>
							</ul>
							<ul>
								<li class="form-title">
									<label>所在地区：</label>
								</li>
								<li class="form-content">
									<p th:text="${shop.orgId}">  </p>
								</li>
							</ul>
						</div>
					</article>
					<article>
						<div class="title-border fb mt16px mb16px">商铺信息</div>
						<div class="layui-tab">
							<ul class="layui-tab-title">
								<li class="layui-this">商铺详情</li>
								<li>商铺产权</li>
								<li>执法记录</li>
								<li>证照管理</li>
								<li>二维码</li>
							</ul>
							<div class="layui-tab-content border1px border-top0" style="padding: 20px;">
								<div class="layui-tab-item layui-show">
									<div class="form-style form-box">
										<ul>
											<li class="form-title">
												<label>姓名：</label>
											</li>
											<li class="form-content">
												<p th:text="${shop.shopkeeperName}"> </p>
											</li>
										</ul>
										
										<ul>
											<li class="form-title">
												<label>身份证号：</label>
											</li>
											<li class="form-content">
												<p  th:text="${shop.userPid}"></p>
											</li>
										</ul>
										<ul>
											<li class="form-title">
												<label>联系方式：</label>
											</li>
											<li class="form-content">
												<p th:text="${shop.phone}"></p>
											</li>
										</ul>
										<ul>
											<li class="form-title">
												<label>开业日期：</label>
											</li>
											<li class="form-content">
												<p th:text="${shop.openTime}"></p>
											</li>
										</ul>
										<ul>
											<li class="form-title">
												<label>店铺标签：</label>
											</li>
											<li class="form-content">
												<p class="label-span">
													<span th:each="item:${#strings.arraySplit(shop.shopType,',')}"  th:text="${item}"></span>
													<!-- <span>模范店铺</span>
													<span>百年老店</span> -->
												</p>
											</li>
										</ul>
									</div>
								</div>
								<div class="layui-tab-item">
									<div class="form-style form-box">
										<ul>
											<li class="form-title">
												<label>商铺产权：</label>
											</li>
											<li class="form-content">
												<p th:text="${shop.shopProperty}"></p>
											</li>
										</ul>
										<ul>
											<li class="form-title">
												<label>产权人：</label>
											</li>
											<li class="form-content">
												<p th:text="${shop.propertyName}">餐饮</p>
											</li>
										</ul>
										<ul>
											<li class="form-title">
												<label>身份证号：</label>
											</li>
											<li class="form-content">
												<p th:text="${shop.propertyUserPid}"></p>
											</li>
										</ul>
										<ul>
											<li class="form-title">
												<label>联系方式：</label>
											</li>
											<li class="form-content">
												<p th:text="${shop.propertyPhone}"></p>
											</li>
										</ul>
									</div>
								</div>
								<div class="layui-tab-item textCenter">
									<div class="enforce-top display-flex justify-between lh32px pb16px border-bot1px mb16px">
										<div class="display-flex one">
											<p class="more-cur"><span class="current">本月</span><span>最近3个月</span><span>本年</span></p>
											<p class="form-style display-flex ml10px"><input type="" name="" id="" value="" class="form-input-time1 time" /><span class="bgBlue"><img src="../static/shopPrivate/shopManage/img/button_search.png" alt=""></span></p>
										</div>
										<div class="two display-flex">
											<p><span><img src="../static/shopPrivate/shopManage/img/enforce_01.png">执法记录</span><span class="blue">199</span></p>
											<p><span><img src="../static/shopPrivate/shopManage/img/enforce_02.png">整改次数</span><span class="green">199</span></p>
											<p><span><img src="../static/shopPrivate/shopManage/img/enforce_03.png">处罚次数</span><span class="red1">199</span></p>
											<p><span><img src="../static/shopPrivate/shopManage/img/enforce_04.png">处罚金额</span><span class="orange">￥199</span></p>
										</div>
									</div>
									<div class="layui-tab layui-tab-all">
										<ul class="layui-tab-title">
											<li>全部</li>
											<li>处理中<span class="blue">&nbsp;5</span></li>
											<li class="layui-this">整改中<span class="blue">&nbsp;5</span></li>
											<li>已处理<span class="blue">&nbsp;99+</span></li>
										</ul>
										<div class="layui-tab-content border1px enforce-page" style="padding: 20px;">
											<div class="layui-tab-item">
												<div>
													<table class="layui-hide" id="table1" lay-filter="test"></table>
													<div class="number-page">共有<span class="red">120</span>条数据</div>
												</div>
											</div>
											<div class="layui-tab-item">
												<div>
													<table class="layui-hide" id="table2" lay-filter="test"></table>
													<div class="number-page">共有<span class="red">120</span>条数据</div>
												</div>
											</div>
											<div class="layui-tab-item layui-show">
												<div class="relative">
													<table class="layui-hide" id="table3" lay-filter="test"></table>
													<div class="number-page">共有<span class="red">120</span>条数据</div>
												</div>
											</div>
											<div class="layui-tab-item">
												<div>
													<table class="layui-hide" id="table4" lay-filter="test"></table>
													<div class="number-page">共有<span class="red">120</span>条数据</div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div class="layui-tab-item">
									<div style="width: 950px;">

										<div th:each=" lice: ${shop.shopLicence}" class="border1px pad16px mb16px">
											<div class="add-mess form-style">
												<div class="add-mess-child">
													<div>
														<label>证照名称：</label>
													</div>
													<p th:text="${lice.licenceType}"></p>
												</div>
												<div class="add-mess-child">
													<div>
														<label>证照有效期：</label>
													</div>
													<p th:text="${lice.validityType}"></p>
												</div>
												<div class="add-mess-child">
													<div>	
														<label>有效期至：</label>
													</div>
													<p><em th:text="${lice.validityTime}"></em>
														<span th:if="${lice.isEffective==1}" class="ml10px">
															<img src="../static/shopPrivate/shopManage/img/lable_sxz.png" >
														</span>
														<span th:if="${lice.isEffective==2}" class="ml10px">
															<img src="../static/shopPrivate/shopManage/img/lable_ysx.png" >
														</span>
													</p>
												</div>
												<div class="add-mess-child">
													<div>
														<label>上传照片：</label>
													</div>
													<ul class="add-mess-filejs overflow">
														<li th:each=" liceImg: ${lice.imageArr}" >
															<span><img th:src="${liceImg}"></span>
														</li>
														<!-- <li>
															<span><img src="img/file_01.png"></span>
														</li>
														<li>
															<span><img src="img/img_file.png"></span>
														</li> -->
													</ul>
												</div>
											</div>
										</div>
										
									</div>
								</div>
								<div class="layui-tab-item textCenter">
									<dl class="inline-block mt16px mb16px">
										<dt><img src="../static/shopPrivate/shopManage/img/img_erweima.png"></dt>
										<dd class="pt16px">
											<div class="new-data-btn mt20px mb16px lh30px overflow">
												<span class="white border-radius4 bgBlue inline-block cursor"><img src="../static/shopPrivate/shopManage/img/icon_xz.png" style="vertical-align: -2px;">下载二维码</span>
											</div>
										</dd>
										<dd class="gray">微信扫描二维码，可直接进入商铺</dd>
									</dl>
								</div>
							</div>
						</div>
					</article>
				</div>
			</div>
		</div>
	</div>	
	<div class="layui-footer layui-footer-one">
		<div class="btn-con textCenter lh40px">
			<span th:if="${shop.state}!=8" class="btn-compile" onclick="jumpUpdate()">编&nbsp;辑</span>
			<span class="btn-inquire" onclick="del()">删&nbsp;除</span>
			<span th:if="${shop.state}!=8" class="btn-inquire" onclick="shopClose()">商铺关闭</span>
			<span class="btn-cancel" onclick="back()">返回列表</span>
		</div>
	</div>

	<!-- <div id="pop-con" style="display: none;">
		<div class="pop-up">
			<p class="pop-title-top"><span>执法详情</span><span class="pop-close right"><img src="../static/shopPrivate/shopManage/img/icon_close.png"></span></p>
			<div class="pad24px">
				<div class="add-mess-break">
					<div class="add-mess-scroll">
						<div>
							<div class="add-mess form-style relative">
								<div class="dispose-absolute"><img src="../static/shopPrivate/shopManage/img/dispose_01.png"></div>
								<div class="add-mess-child">
									<div>
										<label>违法类型：</label>
									</div>
									<p>违章停车</p>
								</div>
								<div class="add-mess-child">
									<div>
										<label>信息来源：</label>
									</div>
									<p>信息来源信息来源有效期限</p>
								</div>
								<div class="add-mess-child">
									<div>
										<label>描述：</label>
									</div>
									<p>信息来源信息来源有效期限</p>
								</div>
								<div class="add-mess-child">
									<div>
										<label>上传照片：</label>
									</div>
									<ul class="add-mess-filejs overflow">
										<li>
											<span><img src="../static/shopPrivate/shopManage/img/break_01.png"></span>
										</li>
										<li>
											<span><img src="../static/shopPrivate/shopManage/img/break_02.png"></span>
										</li>
										<li>
											<span><img src="../static/shopPrivate/shopManage/img/break_03.png"></span>
										</li>
										<li>
											<span><img src="../static/shopPrivate/shopManage/img/break_01.png"></span>
										</li>
									</ul>
								</div>
								<div class="add-mess-child gray textRight">
									<p><span class="mr10px">执法人员：小名</span><span class="mr10px">更新时间：2021-04-18 12:00:00</span></p>
								</div>
							</div>
							<div class="add-mess form-style relative">
								<div class="title-border fb mt16px mb16px">处理结果</div>
								<div class="add-mess-child">
									<div>
										<label>描述：</label>
									</div>
									<p>信息来源信息来源有效期限</p>
								</div>
								<div class="add-mess-child">
									<div>
										<label>上传照片：</label>
									</div>
									<ul class="add-mess-filejs overflow">
										<li>
											<span><img src="../static/shopPrivate/shopManage/img/break_01.png"></span>
										</li>
										<li>
											<span><img src="../static/shopPrivate/shopManage/img/break_02.png"></span>
										</li>
										<li>
											<span><img src="../static/shopPrivate/shopManage/img/break_03.png"></span>
										</li>
										<li>
											<span><img src="../static/shopPrivate/shopManage/img/break_01.png"></span>
										</li>
									</ul>
								</div>
								<div class="add-mess-child gray textRight">
									<p><span class="mr10px">执法人员：小名</span><span class="mr10px">更新时间：2021-04-18 12:00:00</span></p>
								</div>
							</div>
							<div class="add-mess form-style relative">
								<div class="title-border fb mt16px mb16px">整改/处罚</div>
								<div class="add-mess-child">
									<div>
										<label>是否整改：</label>
									</div>
									<p>是</p>
								</div>
								<div class="add-mess-child">
									<div>
										<label>开处罚单：</label>
									</div>
									<p>是</p>
								</div>
								<div class="add-mess-child">
									<div>
										<label>罚款金额：</label>
									</div>
									<p>200元</p>
								</div>
								<div class="add-mess-child">
									<div>
										<label>描述：</label>
									</div>
									<p>是否整改是否整改是否整改是否整改是否整改是否整改是否整改</p>
								</div>
								<div class="add-mess-child gray textRight">
									<p><span class="mr10px">执法人员：小名</span><span class="mr10px">更新时间：2021-04-18 12:00:00</span></p>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="btn-con btn-con-margin textCenter lh32px mt16px mb16px">
					<span class="btn-cancel">关&nbsp;闭</span>
				</div>
			</div>
		</div>
	</div> -->
<script src="../static/shopPrivate/js/jquery-3.1.1.min.js"></script>
<script src="../static/shopPrivate/layui/layui.js" charset="utf-8"></script>
<script>
	var layer;
	$(function(){
		layui.use(['form','element','laydate','table','layer'], function() {
			var form = layui.form;
			var element = layui.element;
			var laydate = layui.laydate;
			var table = layui.table;
			 layer = layui.layer;
		})
		
		$(".filejs").click(function(){
			$(".file").click();
		})
		$('.more-cur span').click(function(){
			$(this).addClass('current').siblings().removeClass('current');
		})

		// layerOne();

		queryIllegalList();

	})


	function queryIllegalList(){
		layui.use(['form','element','laydate','table'], function() {
			var form = layui.form;
			var element = layui.element;
			var laydate = layui.laydate;
			var table = layui.table;
			var layer = layui.layer;
			var data1 = [{
				"username": "小茗同学",
				"sex": 1,
				"city": "用户管理",
				"sign": "<img src='../static/shopPrivate/shopManage/img/duigou.png'>",
				"operation": "详情"
			}, {
				"username": "小茗同学",
				"sex": 1,
				"city": "用户管理",
				"sign": "<img src='../static/shopPrivate/shopManage/img/duigou.png'>",
				"operation": "详情"
			}, ];
			laydate.render({
			    elem: '.time',
				type: 'date'
			});
			//全部
			table.render({
				elem: '#table1',
				data: data1,
				page: true,
				cols: [
					[ 
						{
							field: 'username',
							title: '角色名称',
						}, {
							field: 'sex',
							title: '角色描述',
						}, {
							field: 'city',
							title: '状态',
							templet: function(res){
								console.log(res);
								return "<div><span class='red'>整改中</span></div>"
								// 整改中 red
								// 处理中 green
							}
						}, {
							field: 'sign',
							title: '处罚',
						},{
							field: 'operation',
							title: '操作',
							templet: function(res){
								console.log(res);
								return "<div class='table-list-btn'><span class='blue'>查看</span></div>"
							}
						}
					]
				]
			});
			//处理中
			table.render({
				elem: '#table2',
				data: data1,
				page: true,
				cols: [
					[ 
						{
							field: 'username',
							title: '角色名称',
						}, {
							field: 'sex',
							title: '角色描述',
						}, {
							field: 'city',
							title: '状态',
							templet: function(res){
								// console.log(res);
								return "<div><span class='green'>处理中</span></div>"
							}
						}, {
							field: 'sign',
							title: '处罚',
						},{
							field: 'operation',
							title: '操作',
							templet: function(res){
								// console.log(res);
								return "<div class='table-list-btn'><span class='blue'>查看</span></div>"
							}
						}
					]
				]
			});
			//整改中
			table.render({
				elem: '#table3',
				data: data1,
				page: true,
				cols: [
					[ 
						{
							field: 'username',
							title: '角色名称',
						}, {
							field: 'sex',
							title: '角色描述',
						}, {
							field: 'city',
							title: '状态',
							templet: function(res){
								// console.log(res);
								return "<div><span class='red'>整改中</span></div>"
							}
						}, {
							field: 'sign',
							title: '处罚',
						},{
							field: 'operation',
							title: '操作',
							templet: function(res){
								// console.log(res);
								return "<div class='table-list-btn'><span class='blue'>查看</span></div>"
							}
						}
					]
				]
			});
			//已处理
			table.render({
				elem: '#table4',
				data: data1,
				page: true,
				cols: [
					[ 
						{
							field: 'username',
							title: '角色名称',
						}, {
							field: 'sex',
							title: '角色描述',
						}, {
							field: 'city',
							title: '状态',
							templet: function(res){
								// console.log(res);
								return "<div><span>已处理</span></div>"
							}
						}, {
							field: 'sign',
							title: '处罚',
						},{
							field: 'operation',
							title: '操作',
							templet: function(res){
								// console.log(res);
								return "<div class='table-list-btn'><span class='blue'>查看</span></div>"
							}
						}
					]
				]
			});
			
		});
	}


	function back(){
		window.history.back();
	}



	function jumpUpdate(){
		var id = $("#shopId").val();
		window.location.href="../shop/jumpShopUpdate?id="+id;
	}



	function del(){

		layer.confirm('确定要删除么？', {
		  btn: ['确定', '取消'] //可以无限个按钮
		}, function(index, layero){
		  	del2();
		}, function(index){
		  
		});
	}

	function del2(){
		var id = $("#shopId").val();
		var formDate =
        {
            id: id
        };

		$.ajax({
            url: "../shop/deleteShop",
            type: "post",
            dataType: "json",
            data: formDate,
            async: false,
            success: function (res) {	
                if (res.code == "200") {
                	layer.msg('成功', {icon: 1,time:500},function(){
                		//删除成功 返回列表页
                		window.history.back();
                	});
                }else{
                	layer.msg(res.msg, {icon: 2});
                }
            },
        });
	}


	
	function  shopClose(){

		layer.confirm('确定要关闭么？', {
		  btn: ['确定', '取消'] //可以无限个按钮
		}, function(index, layero){
		  	shopClose2();
		}, function(index){
		  
		});
	}


	function shopClose2(){
		var id = $("#shopId").val();
		var formDate =
        {
            id: id
        };

		$.ajax({
            url: "../shop/closeShop",
            type: "post",
            dataType: "json",
            data: formDate,
            async: false,
            success: function (res) {	
                if (res.code == "200") {
                	layer.msg('成功', {icon: 1,time:500},function(){
                		//删除成功 返回列表页
                		window.history.back();
                	});
                }else{
                	layer.msg(res.msg, {icon: 2});
                }
            },
        });
	}




	// function layerOne(){
	// 	layui.use(['layer'], function() {

	// 		layer.open({
	// 			type: 1  
	// 			,title: false
	// 			,closeBtn: false
	// 			//新建组织
	// 			,area: ['689px','']
	// 			,shade: 0.2
	// 			,id: 'payCons' 
	// 			,btnAlign: 'c'
	// 			,moveType: 1 
	// 			,shadeClose: true
	// 			,content: $("div#pop-con").html(),
	// 			success:function(){
	// 				//关闭弹层
	// 				$(".pop-close").click(function(){
	// 					layer.closeAll();
	// 				});
	// 			},
				
	// 		});
	// 	})
	// }
	
</script>
</body>

</html>
